package com.example.hcmiu.englishforkid;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;

public class VideoActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);

		setContentView(R.layout.activity_video);
		MainActivity.CurrentActivity = this;

	}

	public void TalkClick(View v) {
		Button b = (Button) v;

		String videoId = b.getTag().toString();
		System.out.println("TALK NOW = " + videoId);

		if (videoId == null || videoId.trim().equals("")) {
			return;
		}

		Intent lVideoIntent = new Intent(null, Uri.parse("ytv://" + videoId),
				VideoActivity.this, OpenYouTubePlayerActivity.class);
		startActivity(lVideoIntent);

	}

}
